<?php

include('includes/connect.php');

$name=$_POST['name'];
$email=$_POST['email'];
$city=$_POST['city'];
$gender=$_POST['gender'];


	$usr=mysql_query("select * from user_attempt where user='".$email."'");
	$fetch=mysql_fetch_array($usr);
	
	//$ud=$fetch['user_attempt'];	
	 
	  	  
			  if(mysql_num_rows($usr)>0)
			  {
			    
				 header("location:thnk.php");
				
			  }
		  	  else
			  {
			  	$s=mysql_query("insert into usr(`name`,`email`,`city`,`gender`)values('$name','$email','$city','$gender')");
			  }	
				

				 if($s)
				 {
				 header("location:plegde.php");
				 
				 }



?>